package cn.z2huo.knowledge.basic.switchcontrol.newswitch;

class OldSwitch {

    public static void test(DayEnum day) {
        switch (day) {
            case MONDAY:
            case FRIDAY:
            case SUNDAY:
                int temp = 0;
                System.out.println(6);
                System.out.println("temp " + temp);
            case TUESDAY:
                temp = 2;
                System.out.println(7);
                System.out.println("temp " + temp);
                break;
            case THURSDAY:
            case SATURDAY:
                temp = 4;
                System.out.println(8);
                break;
            case WEDNESDAY:
                System.out.println(9);
                break;
        }
    }

    public static int test2(DayEnum day) {
        int numLetters;
        switch (day) {
            case MONDAY:
            case SUNDAY:
                numLetters = 6;
                break;
            case TUESDAY:
                numLetters = 7;
                break;
            case THURSDAY:
            case SATURDAY:
                numLetters = 8;
                break;
            case WEDNESDAY:
                numLetters = 9;
                break;
            default:
                throw new IllegalStateException("Wat: " + day);
        }
        return numLetters;
    }

    public static void main(String[] args) {
        test(DayEnum.SUNDAY);
    }

}
